package com.hncc.dms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hncc.dms.mapper.DmsMedicinePrescriptionRecordMapper;
import com.hncc.dms.domain.DmsMedicinePrescriptionRecord;
import com.hncc.dms.service.IDmsMedicinePrescriptionRecordService;
import javax.annotation.Resource;

/**
 * 成药处方Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-04
 */
@Service
public class DmsMedicinePrescriptionRecordServiceImpl implements IDmsMedicinePrescriptionRecordService 
{
    @Resource
    private DmsMedicinePrescriptionRecordMapper dmsMedicinePrescriptionRecordMapper;

    /**
     * 查询成药处方
     * 
     * @param id 成药处方ID
     * @return 成药处方
     */
    @Override
    public DmsMedicinePrescriptionRecord selectDmsMedicinePrescriptionRecordById(Long id)
    {
        return dmsMedicinePrescriptionRecordMapper.selectDmsMedicinePrescriptionRecordById(id);
    }

    /**
     * 查询成药处方列表
     * 
     * @param dmsMedicinePrescriptionRecord 成药处方
     * @return 成药处方
     */
    @Override
    public List<DmsMedicinePrescriptionRecord> selectDmsMedicinePrescriptionRecordList(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord)
    {
        return dmsMedicinePrescriptionRecordMapper.selectDmsMedicinePrescriptionRecordList(dmsMedicinePrescriptionRecord);
    }

    /**
     * 新增成药处方
     * 
     * @param dmsMedicinePrescriptionRecord 成药处方
     * @return 结果
     */
    @Override
    public int insertDmsMedicinePrescriptionRecord(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord)
    {
        dmsMedicinePrescriptionRecord.setCreateTime(DateUtils.getNowDate());
        return dmsMedicinePrescriptionRecordMapper.insertDmsMedicinePrescriptionRecord(dmsMedicinePrescriptionRecord);
    }

    /**
     * 修改成药处方
     * 
     * @param dmsMedicinePrescriptionRecord 成药处方
     * @return 结果
     */
    @Override
    public int updateDmsMedicinePrescriptionRecord(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord)
    {
        return dmsMedicinePrescriptionRecordMapper.updateDmsMedicinePrescriptionRecord(dmsMedicinePrescriptionRecord);
    }

    /**
     * 批量删除成药处方
     * 
     * @param ids 需要删除的成药处方ID
     * @return 结果
     */
    @Override
    public int deleteDmsMedicinePrescriptionRecordByIds(Long[] ids)
    {
        return dmsMedicinePrescriptionRecordMapper.deleteDmsMedicinePrescriptionRecordByIds(ids);
    }

    /**
     * 删除成药处方信息
     * 
     * @param id 成药处方ID
     * @return 结果
     */
    @Override
    public int deleteDmsMedicinePrescriptionRecordById(Long id)
    {
        return dmsMedicinePrescriptionRecordMapper.deleteDmsMedicinePrescriptionRecordById(id);
    }

    /**
     * 缴费|退费 查询成药处方列表
     * @param dmsMedicinePrescriptionRecord
     * @return
     */
    @Override
    public List<DmsMedicinePrescriptionRecord> selectDmsMedicinePrescriptionRecordGetList(DmsMedicinePrescriptionRecord dmsMedicinePrescriptionRecord) {
        return dmsMedicinePrescriptionRecordMapper.selectDmsMedicinePrescriptionRecordGetList(dmsMedicinePrescriptionRecord);
    }
}
